<?php
if(!defined('BASEPATH')) {
	exit('No direct script access allowed');
}

/*
 *用户注册
 *@author 王春林
 */
class register extends CI_Controller {
	function __construct() {
		parent::__construct();
		$this->load->helper('url');
		$this->load->model("login_model");
	}
	
	function index() {
		$this->load->view("register");
		$this->load->view("footers/footer02");
	}	
	/*
	 *用户注册
	 */
	function regist(){
		$formvalue = $_POST;
		$formvalue['createTime'] = date('Y-m-d H:i:s');
		$this->login_model->regist($formvalue);
		$this->load->view("cjzy");
		//$this->load->view("login");
		$this->load->view("footers/footer02");
	}
	/*
	 *判断用户名是否存在
	 */
	function isuse() {
		$email = $_POST['username'];
		echo $this->login_model->isuse($email);
	}
	/**
	 * 填写更多个人信息
	 */
	function nextStep($prefix,$suffix,$password) {
		$register = array();
		$register['prefix'] = $prefix;
		$register['suffix'] = $suffix;
		$register['password'] = md5($password);
		$data['users'] = $register;
		$this->load->view("register2",$data);
	}
}
?>